package ee.ttu.karileet.serviceshop.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ee.ttu.karileet.serviceshop.dao.ServiceRequestDAO;
import ee.ttu.karileet.serviceshop.dao.ServiceRequestStatusTypeDAO;
import ee.ttu.karileet.serviceshop.model.ServiceRequest;
import ee.ttu.karileet.serviceshop.model.ServiceRequestStatusType;
import ee.ttu.karileet.serviceshop.service.ServiceRequestService;
import ee.ttu.karileet.serviceshop.service.ServiceRequestStatusTypeService;


@Service
public class ServiceRequestStatusTypeServiceImpl implements ServiceRequestStatusTypeService {

	@Autowired
	private ServiceRequestStatusTypeDAO serviceRequestStatusTypeDao;
	
	@Override
	@Transactional
	public void insertServiceRequestStatusType(ServiceRequestStatusType serviceRequestStatusType) {
		serviceRequestStatusTypeDao.insertServiceRequestStatusType(serviceRequestStatusType);
	}

	@Override
	@Transactional
	public List<ServiceRequestStatusType> getServiceRequestStatusTypes() {
		return serviceRequestStatusTypeDao.getServiceRequestStatusTypes();
	}

	@Override
	@Transactional
	public ServiceRequestStatusType getServiceRequestStatusTypeById(long serviceRequestStatusTypeId) {
		return serviceRequestStatusTypeDao.getServiceRequestStatusTypeById(serviceRequestStatusTypeId);
	}

}
